﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Security.Cryptography;
using System.Text;

namespace ClockInLearning.Tools
{
    // 加密操作类
    public static class Encryption
    {
        // MD5加密，对平台自带方法进行封装
        public static string MD5Encryption(string value)
        {
            using var md5 = MD5.Create();
            var byteResult = md5.ComputeHash(Encoding.UTF8.GetBytes(value));
            var strResult = BitConverter.ToString(byteResult);
            string result = strResult.Replace("-", "");
            return result;
        }
    }
}
